#ifndef _HART_HANDLER_H_
#define _HART_HANDLER_H_

/* Includes ------------------------------------------------------------------*/
#include "fm33lg0xx_fl.h"
#include "main.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#ifdef _HART_HANDLER_C_
#include "Hart_5700ACPZ_RL7.h"
#include "HartCommands.h"
#include "DataFlashMap.h"
#endif
/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
typedef struct{
	uint16_t uiDataCnt;
	uint8_t ucAryBuffer[HART_RX_BUFFER_SIZE];
}STHartRxData;
/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
extern STHartRxData stHartRxData;
/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
#define HART_RTS_H()                                       (FL_GPIO_SetOutputPin(GPIOA, FL_GPIO_PIN_12))
#define HART_RTS_L()                                       (FL_GPIO_ResetOutputPin(GPIOA, FL_GPIO_PIN_12))

#define HART_RST_H()                                       (FL_GPIO_SetOutputPin(GPIOB, FL_GPIO_PIN_4))
#define HART_RST_L()                                       (FL_GPIO_ResetOutputPin(GPIOB, FL_GPIO_PIN_4))
/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
void vHartHandler(void);
/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */
#endif // _HART_HANDLER_H_
